#!/bin/sh

set -e

PLATFORMS="STM32F030 STM32F031 STM32F051 STM32F072 STM32F042 STM23F0XX_MD STM32F0XX_LD STM32F0XX_HD STM32F030X8 STM32F030X6"
PLATFORMS="$PLATFORMS STM32F10X_LD STM32F10X_LD_VL STM32F10X_MD STM32F10X_MD_VL STM32F10X_HD STM32F10X_HD_VL STM32F10X_XL STM32F10X_CL"
PLATFORMS="$PLATFORMS STM32F2XX"
PLATFORMS="$PLATFORMS STM32F30X STM32F303xC STM32F334x8 STM32F302x8"
PLATFORMS="$PLATFORMS STM32F37X"
PLATFORMS="$PLATFORMS STM32F40_41xxx STM32F427_437xx STM32F429_439xx STM32F401xx"
PLATFORMS="$PLATFORMS STM32L1XX_MD STM32L1XX_MDP STM32L1XX_HD"
PLATFORMS="$PLATFORMS STM32W108C8 STM32W108CB STM32W108CC STM32W108CZ STM32W108HB"

for pfm in $PLATFORMS; do
	echo ">>>> Testing $pfm"
	echo
	make PLATFORM=$pfm clean 2>&1 >/dev/null
	make PLATFORM=$pfm -j5 all 2>&1 >/dev/null
	make PLATFORM=$pfm clean 2>&1 >/dev/null
done

echo "All OK"
